<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入vue -->
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>
<body>
    <div id="app">
        <el-button v-bind:plain="true" v-on:click="open1">消息</el-button>
        <el-button v-bind:plain="true" v-on:click="open2">成功</el-button>
        <el-button v-bind:plain="true" v-on:click="open3">警告</el-button>
        <el-button v-bind:plain="true" v-on:click="open4">错误</el-button>
    </div>

    <script>
        var vue = new Vue({
           el:"#app",
            methods: {
               open1(){
                   this.$message("这是一条消息提示");
               },
                open2(result){
                   this.$message({
                       message:"这是一条成功消息",
                       type:"success"
                   })
                },
                open3(){
                   this.$message({
                       message:'这是一条警告消息',
                       type:'warning'
                   })
                },
                open4(){
                   this.$message.error("这是一条错误消息")
                }
            }
        });
    </script>
</body>
</html>